88157025830de105f092aed6e70c4000b229e5e1,maven-install-plugin/src/test/java/org/apache/maven/plugin/install/InstallFileMojoTest.java,InstallFileMojoTest,testInstallFileWithChecksum,#,257

Before Change


        File installedArtifact = new File( localPath + "." + "jar" );

        File md5 = new File( localPath + ".jar.md5" );
        File sha1 = new File( localPath + ".jar.sha1" );

        assertTrue( md5.exists() );
        assertTrue( sha1.exists() );

        String generatedMd5 = FileUtils.fileRead( md5, "UTF-8" );
        String generatedSha1 = FileUtils.fileRead( sha1, "UTF-8" );

        assertEquals( actualMd5Sum, generatedMd5 );
        assertEquals( actualSha1Sum, generatedSha1 );

After Change


        File installedArtifact = new File( localPath + "." + "jar" );
        
        //get the actual checksum of the artifact
        Map<String, Object> csums = ChecksumUtils.calc( file, Utils.CHECKSUM_ALGORITHMS );
        for (Map.Entry<String, Object> csum : csums.entrySet()) {
            Object actualSum = csum.getValue();
            File sum = new File( localPath + ".jar." + csum.getKey().toLowerCase().replace( "-", "" ) );
            assertTrue( sum.exists() );
            String generatedSum = FileUtils.fileRead( sum, "UTF-8" );
            assertEquals( actualSum, generatedSum );
        }

        assertTrue( installedArtifact.exists() );